<%@ page import="bean.Movie" %>
<%@ page import="dao.impl.MovieDaoImpl" %>
<%@ page import="util.DataTypeConversion" %><%--
  Created by IntelliJ IDEA.
  User: Peter Zhou
 
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>电影详情页</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f5f5f5;
        }
        body {
            background-image: url('../img/ui/beijing.jpg');
            background-size: cover;
            background-repeat: no-repeat;
            background-attachment: fixed; /* 可选，使背景图片固定不动 */
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
            display: flex;
            justify-content: center;
            align-items: center;
            opacity: 0.8;
        }
        .movie-details {
            background-color: #fff;
            border-radius: 8px;
            padding: 20px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            display: flex;
            flex-direction: row;
        }
        .movie-info {
            margin-left: 20px;
        }
        .movie-poster {
            max-width: 38%;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        .movie-title {
            font-size: 32px;
            margin-top: 20px;
            margin-bottom: 10px;
            color: #333;
        }
        .movie-info p {
            font-size: 18px;
            margin-bottom: 10px;
            color: #666;
        }
        .synopsis {
            font-size: 20px;
            margin-bottom: 20px;
            color: #333;
        }
        .ticket-button {
            display: inline-block;
            padding: 10px 20px;
            background-color: #007bff;
            color: #fff;
            text-decoration: none;
            border-radius: 5px;
            transition: background-color 0.3s ease;
        }

        .ticket-button:hover {
            background-color: #0056b3;
        }
        .ticket-section {
            flex-shrink: 0; /* 防止购票按钮被压缩 */
        }
    </style>
</head>

<body>
<div class="container">
    <div class="movie-details">
        <%
            Movie movie = (Movie) request.getSession().getAttribute("movie");
            System.out.println(movie);
        %>
        <img src="../img/movie/<%=movie.getImg()%>" alt="<%=movie.getName()%>" class="movie-poster">
        <div class="movie-info">
            <h1 class="movie-title"><%=movie.getName()%></h1>
            <p><strong>主演：</strong><%=movie.getMain_actor()%></p>
            <p><strong>类型：</strong><%=movie.getType()%></p>
            <p><strong>上映时间：</strong><%=movie.getDate()%></p>
            <div><a href=session.jsp class="ticket-button">前往购票</a></div>
            <h1 class="movie-title">电影介绍</h1>
            <p><%=movie.getdetail()%></p>
        </div>
    </div>
</div>
</body>
</html>
